package sg.edu.nus.iss.ooad.jass.dao;

import java.util.List;
import sg.edu.nus.iss.ooad.jass.entity.JobAdvertisement;

/**
 *
 * Interface class for JobAdvertisement Data Access Object.
 *
 * @author Isak Rabin (HT082193M)
 * @version 1.0
 * @since 1.0
 *
 * Development Environment : Netbeans IDE v6.7
 * Name of the File        : IJobAdvertisementDAO.java
 * Creation / Modification History
 *         Isak Rabin        20-Sep-2009        Created
 *
 */
public interface IJobAdvertisementDAO {

        /**
         * Create new jobadvertisement entity and store it to the persistent data.
         * @param jobadvertisement The jobadvertisement entity.
         * @return True if new jobadvertisement successfully created.
         */
        public boolean createJobAdvertisement(JobAdvertisement jobadvertisement);

        /**
         * Retrieve jobadvertisement entity from persistent data.
         * @param ID The ID of JobAdvertisement.
         * @return JobAdvertisement object or null if JobAdvertisement cannot be found.
         */
        public JobAdvertisement retrieveJobAdvertisement(String ID);

        /**
         * Update existing jobadvertisement.
         * @param jobadvertisement The jobadvertisement entity.
         * @return True if jobadvertisement has successfully updated.
         */
        public boolean updateJobAdvertisement(JobAdvertisement jobadvertisement);

        /**
         * Mark jobadvertisement as deleted.
         * @param jobadvertisement The jobadvertisement entity.
         * @return True if jobadvertisement has successfully mark as deleted.
         */
        public boolean deleteJobAdvertisement(JobAdvertisement jobadvertisement);

        /**
         * Retrieve all jobadvertisements.
         * @return List of jobadvertisement.
         */
        public List<JobAdvertisement> getAllJobAdvertisement();

        /**
         * Find JobAdvertisement by using JobAdvertisement Title as search criteria
         * @param title JobAdvertisement Title.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementByTitle(String advertiserID, String title);

        /**
         * Find JobAdvertisement by using JobAdvertisement Location as search criteria
         * @param location JobAdvertisement Location.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementByLocation(String advertiserID, String location);

        /**
         * Find JobAdvertisement by using JobAdvertisement Technical/Management Skills as search criteria
         * @param skills JobAdvertisement Technical/Management Skills.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementBySkills(String advertiserID, String skills);

        /**
         * Find JobAdvertisement for the "n" days as search criteria
         * @param nDaysBefore The number of days.
         * @return List of JobAdvertisement for the last n days.
         */
        public List<JobAdvertisement> findJobAdvertisementByAdvertisementDate(String advertiserID, int nDaysBefore);

        /**
         * Find JobAdvertisement by using JobAdvertisement Salary as search criteria
         * @param salary JobAdvertisement Salary.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementBySalary(String advertiserID, float salary);

        /**
         * Find JobAdvertisement by using JobAdvertisement Company ID as search criteria
         * @param companyID JobAdvertisement Company ID.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementByCompanyId(String advertiserID, String companyID);

        /**
         * Find JobAdvertisement by using JobAdvertisement Company Name as search criteria
         * @param companyName JobAdvertisement Company Name.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementByCompanyName(String advertiserID, String companyName);

        /**
         * Find JobAdvertisement by using JobAdvertisement AdvertiserID as search criteria
         * @param advertiserID JobAdvertisement AdvertiserID.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementByAdvertiserID(String advertiserID);

        /**
         * Find JobAdvertisement by using JobAdvertisement Advertiser Name as search criteria
         * @param advertiserName JobAdvertisement Advertiser Name.
         * @return List of JobAdvertisement.
         */
        public List<JobAdvertisement> findJobAdvertisementByAdvertiserName(String advertiserName);
}

